﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http.Filters;
using XiaoMan.Log;

namespace XiaoMan.API.Filter
{
    public class ApiHandleErrorAttribute : ExceptionFilterAttribute
    {
        public override void OnException(HttpActionExecutedContext actionExecutedContext)
        {
            var _message = actionExecutedContext.Exception.Message;
            var _url = actionExecutedContext.Request.RequestUri.AbsolutePath;
            LoggerManager.LogSysException(actionExecutedContext.Exception);//异常记录
            base.OnException(actionExecutedContext);
        }
    }
}